<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <form action="<?php echo base_url() . 'cadastro/ok'; ?>" method="POST" enctype="multipart/form-data">
            <input type="text" name="edtNome" placeholder="Nome do Evento" required="required"/>
            <textarea name="edtDescricao" placeholder="Descrição do Evento" required="required"></textarea>
            <input type="date" name="edtDataInicio" required="required"/>
            <input type="date" name="edtDataFim" required="required"/>
            <select name="edtPatrocinadores[]" multiple="multiple">
                <?php
                $patrocinador = new Patrocinador();
                $patrocinadores = $patrocinador->findAll();
                foreach ($patrocinadores as $p) {
                    ?>
                    <option value="<?php echo $p->getCodigo(); ?>"><?php echo $p->getDescricao(); ?></option>
                    <?php
                }
                ?>
            </select>
            <select name="edtAreas[]" multiple="multiple">
                <?php
                $area = new Area(true);
                $areas = $area->findAll();
                foreach ($areas as $a) {
                    ?>
                    <option value="<?php echo $a->getCodigo(); ?>"><?php echo $a->getDescricao(); ?></option>
                    <?php
                }
                ?>
            </select>
            <select name="edtInstituicao">
                <?php
                $instituicao = new Instituicao();
                $instituicoes = $instituicao->findInstituicoes();
                foreach ($instituicoes as $i) {
                    ?>
                    <option value="<?php echo $i->getCodigo(); ?>"><?php echo $i->getNome(); ?></option>
                    <?php
                }
                ?>
            </select>
            <button type="submit" name="formCadastroEvento">Cadastrar</button>
        </form>
    </body>
</html>
